package com.szt.mobile.inventory.app;

import android.app.Application;
import android.util.Log;

import com.isoftstone.mis.ffair.comp.network.FFHttpClientComponent;
import com.isoftstone.mis.ffair.util.log.FFLog;
import com.szt.mobile.inventory.common.constants.IntfConstants;
import com.szt.mobile.inventory.common.utils.SpUtil;

/**
 * Created by yanzhaodi on 2017/11/15.
 */

public class InventoryApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();

        FFLog.setDebug(true);
        FFLog.setLevel(Log.DEBUG);

        FFHttpClientComponent.enableDebugLogging(true);

        // 必须先配置了ip和端口才能登陆
        IntfConstants.IP = SpUtil.getInstance(this).getKeyStringValue(SpUtil.Key.KEY_IP, "");
        IntfConstants.PORT = SpUtil.getInstance(this).getKeyStringValue(SpUtil.Key.KEY_PORT, "80");

        IntfConstants.setBaseUrl();
    }
}
